package com.leoman.dao;

import com.leoman.entity.PersonalAuth;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * 个人认证信息
 * Created by Administrator on 2016/10/18 0018 下午 3:03.
 */
public interface PersonalAuthDao extends JpaRepository<PersonalAuth, Integer>, JpaSpecificationExecutor<PersonalAuth> {

    @Query("select a from PersonalAuth a where a.companyUser.id = ?1")
    PersonalAuth findOneByCompanyUserId(Integer companyUserId);
}